import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home/Home.vue'

Vue.use(VueRouter)

const routes = [
	{
		path:'',
		redirect:'/home'
		
		
	},
  {
    path: '/home',
    name: 'home',
    component: Home
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/about/About.vue')
  },
  {
    path: '/order',
    name: 'order',
    component: () => import('../views/order/Order.vue')
  },
  {
    path: '/my',
    name: 'my',
    component: () => import('../views/my/My.vue')
  },
  {
    path: '/life',
    name: 'life',
    component: () => import('../views/life/Life.vue')
  },
  {
    path: '/article',
    name: 'article',
    component: () => import('../views/article/Article.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login/Login.vue')
  },
  {
    path: '/loginitem',
    name: 'loginitem',
    component: () => import('../views/login/LoginItem.vue')
  },
  {
    path: '/loginshous',
    name: 'loginshous',
    component: () => import('../views/login/LoginShous.vue')
  },
  {
    path: '/setup',
    name: 'setup',
    component: () => import('../views/setup/SetUp.vue')
  },
  {
    path: '/news',
    name: 'news',
    component: () => import('../views/news/News.vue')
  },
  {
    path: '/scan',
    name: 'scan',
    component: () => import('../views/scan/Scan.vue')
  },
  {
    path: '/saoma',
    name: 'saoma',
    component: () => import('../views/scan/Saoma.vue')
  },
  {
    path: '/payment',
    name: 'payment',
    component: () => import('../views/scan/Payment.vue')
  },
  {
      path: '/account',
      name: 'account',
      component: () => import('../views/account/Account.vue')
    },
	{
	    path: '/search',
	    name: 'search',
	    component: () => import('../views/search/Search.vue')
	  },
	  {
	      path: '/details',
	      name: 'details',
	      component: () => import('../views/details/Details.vue')
	    },
	  
  
]


const router = new VueRouter({
  routes,
  // 重新定义高度
  // scrollBehavior (to, from, savedPosition) {
  // 	return { x: 0, y: 0 }
  // }
})

export default router
